package com.sunline.poc.oozie.service;

import com.sunline.poc.oozie.client.OozieDTO;
import com.sunline.poc.oozie.config.ApplicationException;

public interface OozieService {
    /**
     * 启动任务
     * @return
     */
    public OozieDTO start(String jobName) throws ApplicationException;

    /**
     * kill job
     * @param jobId
     * @return
     */
    public boolean kill(String jobId);

    /**
     * 重启Job： 即杀掉指定job，再启动一个新的job
     * @param  jobId
     * @param jobName
     * @return
     */
    public OozieDTO restart(String jobId,String jobName);

    /**
     * 获取Job的所有相关信息
     * @param jobId
     * @return
     */
    public OozieDTO getJobInfos(String jobId);

    /**
     * 获取job的状态
     * @param jobId
     * @return
     */
    public String getJobStatus(String jobId);

    /**
     * 重做任务
     * @return
     */
    public OozieDTO rerun(String jobName,String etlDate) throws ApplicationException;
}
